﻿using System.Linq;

namespace VirtualRink.Library
{
	public partial class League
	{

        public Season GetCurrentSeason()
        {
            var items = from s in this.Seasons
                        where s.StartDate <= this.CurrentDate
                        orderby s.StartDate descending
                        select s;
            return items.First();
        }
	}
}
